package Thread;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Demo22 {
    public static void main(String[] args) {
        ExecutorService executors = Executors.newFixedThreadPool(4);
        for (int i = 0; i < 1000; i++) {
            executors.submit(new Runnable() {
                @Override
                public void run() {
                    System.out.println("hello");
                }
            });
        }
    }
}
